package com.lichuang.fruitvarietysm.user.mapper;

import com.lichuang.fruitvarietysm.user.entity.SecurityQuestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 密保问题表 Mapper 接口
 * </p>
 *
 * @author shuaihang
 * @since 2019-06-06
 */
public interface SecurityQuestionMapper extends BaseMapper<SecurityQuestion> {

    @Select("select sq.*,sql.question from security_question sq ,security_question_list `sql`\n" +
            "where sq.user_id = #{userId}\n" +
            "and sq.question_id = sql.question_id")
    List<SecurityQuestion> selectUserSecurityQuestion(@Param("userId") Integer userId);

}
